<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="dialogflow_v2beta1.html">Dialogflow API</a> . <a href="dialogflow_v2beta1.projects.html">projects</a> . <a href="dialogflow_v2beta1.projects.locations.html">locations</a> . <a href="dialogflow_v2beta1.projects.locations.conversations.html">conversations</a> . <a href="dialogflow_v2beta1.projects.locations.conversations.messages.html">messages</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#batchCreate">batchCreate(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.</p>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="batchCreate">batchCreate(parent, body=None, x__xgafv=None)</code>
  <pre>Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.

Args:
  parent: string, Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for Conversations.BatchCreateMessagesRequest.
  &quot;requests&quot;: [ # Required. A maximum of 300 messages can be created in a batch. CreateMessageRequest.message.send_time is required. All created messages will have identical Message.create_time.
    { # The request message to create one Message. Currently it is only used in BatchCreateMessagesRequest.
      &quot;message&quot;: { # Represents a message posted into a conversation. # Required. The message to create. Message.participant is required.
        &quot;content&quot;: &quot;A String&quot;, # Required. The message content.
        &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
        &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: &quot;en-US&quot;.
        &quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
          &quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
          &quot;parts&quot;: [ # Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
            { # Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.
              &quot;entityType&quot;: &quot;A String&quot;, # Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
              &quot;formattedValue&quot;: &quot;&quot;, # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { &quot;amount&quot;: 5, &quot;currency&quot;: &quot;USD&quot; }
              &quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
            },
          ],
        },
        &quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
        &quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
        &quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
        &quot;responseMessages&quot;: [ # Optional. Automated agent responses.
          { # Response messages from an automated agent.
            &quot;endInteraction&quot;: { # Indicates that interaction with the Dialogflow agent has ended. # A signal that indicates the interaction with the Dialogflow agent has ended.
            },
            &quot;liveAgentHandoff&quot;: { # Indicates that the conversation should be handed off to a human agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry fulfillment of a Dialogflow CX Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. # Hands off conversation to a live agent.
              &quot;metadata&quot;: { # Custom metadata for your handoff procedure. Dialogflow doesn&#x27;t impose any structure on this.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
            },
            &quot;mixedAudio&quot;: { # Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. # An audio response message composed of both the synthesized Dialogflow agent responses and the audios hosted in places known to the client.
              &quot;segments&quot;: [ # Segments this audio response is composed of.
                { # Represents one segment of audio.
                  &quot;allowPlaybackInterruption&quot;: True or False, # Whether the playback of this segment can be interrupted by the end user&#x27;s speech and the client should then start the next Dialogflow request.
                  &quot;audio&quot;: &quot;A String&quot;, # Raw audio synthesized from the Dialogflow agent&#x27;s response using the output config specified in the request.
                  &quot;uri&quot;: &quot;A String&quot;, # Client-specific URI that points to an audio clip accessible to the client.
                },
              ],
            },
            &quot;payload&quot;: { # Returns a response containing a custom, platform-specific payload.
              &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
            },
            &quot;telephonyTransferCall&quot;: { # Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. # A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.
              &quot;phoneNumber&quot;: &quot;A String&quot;, # Transfer the call to a phone number in [E.164 format](https://en.wikipedia.org/wiki/E.164).
              &quot;sipUri&quot;: &quot;A String&quot;, # Transfer the call to a SIP endpoint.
            },
            &quot;text&quot;: { # The text response message. # Returns a text response.
              &quot;text&quot;: [ # A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.
                &quot;A String&quot;,
              ],
            },
          },
        ],
        &quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
        &quot;sentimentAnalysis&quot;: { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user&#x27;s attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config # Output only. The sentiment analysis result for the message.
          &quot;queryTextSentiment&quot;: { # The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. See: https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values for how to interpret the result. # The sentiment analysis result for `query_text`.
            &quot;magnitude&quot;: 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
            &quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
          },
        },
      },
      &quot;parent&quot;: &quot;A String&quot;, # Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`.
    },
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The request message for Conversations.BatchCreateMessagesResponse.
  &quot;messages&quot;: [ # Messages created.
    { # Represents a message posted into a conversation.
      &quot;content&quot;: &quot;A String&quot;, # Required. The message content.
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
      &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: &quot;en-US&quot;.
      &quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
        &quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
        &quot;parts&quot;: [ # Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
          { # Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.
            &quot;entityType&quot;: &quot;A String&quot;, # Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
            &quot;formattedValue&quot;: &quot;&quot;, # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { &quot;amount&quot;: 5, &quot;currency&quot;: &quot;USD&quot; }
            &quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
          },
        ],
      },
      &quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
      &quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
      &quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
      &quot;responseMessages&quot;: [ # Optional. Automated agent responses.
        { # Response messages from an automated agent.
          &quot;endInteraction&quot;: { # Indicates that interaction with the Dialogflow agent has ended. # A signal that indicates the interaction with the Dialogflow agent has ended.
          },
          &quot;liveAgentHandoff&quot;: { # Indicates that the conversation should be handed off to a human agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry fulfillment of a Dialogflow CX Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. # Hands off conversation to a live agent.
            &quot;metadata&quot;: { # Custom metadata for your handoff procedure. Dialogflow doesn&#x27;t impose any structure on this.
              &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
            },
          },
          &quot;mixedAudio&quot;: { # Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. # An audio response message composed of both the synthesized Dialogflow agent responses and the audios hosted in places known to the client.
            &quot;segments&quot;: [ # Segments this audio response is composed of.
              { # Represents one segment of audio.
                &quot;allowPlaybackInterruption&quot;: True or False, # Whether the playback of this segment can be interrupted by the end user&#x27;s speech and the client should then start the next Dialogflow request.
                &quot;audio&quot;: &quot;A String&quot;, # Raw audio synthesized from the Dialogflow agent&#x27;s response using the output config specified in the request.
                &quot;uri&quot;: &quot;A String&quot;, # Client-specific URI that points to an audio clip accessible to the client.
              },
            ],
          },
          &quot;payload&quot;: { # Returns a response containing a custom, platform-specific payload.
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;telephonyTransferCall&quot;: { # Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. # A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.
            &quot;phoneNumber&quot;: &quot;A String&quot;, # Transfer the call to a phone number in [E.164 format](https://en.wikipedia.org/wiki/E.164).
            &quot;sipUri&quot;: &quot;A String&quot;, # Transfer the call to a SIP endpoint.
          },
          &quot;text&quot;: { # The text response message. # Returns a text response.
            &quot;text&quot;: [ # A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
      &quot;sentimentAnalysis&quot;: { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user&#x27;s attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config # Output only. The sentiment analysis result for the message.
        &quot;queryTextSentiment&quot;: { # The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. See: https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values for how to interpret the result. # The sentiment analysis result for `query_text`.
          &quot;magnitude&quot;: 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
          &quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
        },
      },
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds &gt; [first item&#x27;s create_time of previous request]` and empty page_token.

Args:
  parent: string, Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` (required)
  filter: string, Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds &gt; 1551790877964485` or `create_time &gt; &quot;2017-01-15T01:30:15.01Z&quot;`. For more information about filtering, see [API Filtering](https://aip.dev/160).
  pageSize: integer, Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
  pageToken: string, Optional. The next_page_token value returned from a previous list request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Conversations.ListMessages.
  &quot;messages&quot;: [ # Required. The list of messages. There will be a maximum number of items returned based on the page_size field in the request. `messages` is sorted by `create_time` in descending order.
    { # Represents a message posted into a conversation.
      &quot;content&quot;: &quot;A String&quot;, # Required. The message content.
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
      &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: &quot;en-US&quot;.
      &quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
        &quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
        &quot;parts&quot;: [ # Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
          { # Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.
            &quot;entityType&quot;: &quot;A String&quot;, # Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
            &quot;formattedValue&quot;: &quot;&quot;, # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { &quot;amount&quot;: 5, &quot;currency&quot;: &quot;USD&quot; }
            &quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
          },
        ],
      },
      &quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
      &quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
      &quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
      &quot;responseMessages&quot;: [ # Optional. Automated agent responses.
        { # Response messages from an automated agent.
          &quot;endInteraction&quot;: { # Indicates that interaction with the Dialogflow agent has ended. # A signal that indicates the interaction with the Dialogflow agent has ended.
          },
          &quot;liveAgentHandoff&quot;: { # Indicates that the conversation should be handed off to a human agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry fulfillment of a Dialogflow CX Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. # Hands off conversation to a live agent.
            &quot;metadata&quot;: { # Custom metadata for your handoff procedure. Dialogflow doesn&#x27;t impose any structure on this.
              &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
            },
          },
          &quot;mixedAudio&quot;: { # Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. # An audio response message composed of both the synthesized Dialogflow agent responses and the audios hosted in places known to the client.
            &quot;segments&quot;: [ # Segments this audio response is composed of.
              { # Represents one segment of audio.
                &quot;allowPlaybackInterruption&quot;: True or False, # Whether the playback of this segment can be interrupted by the end user&#x27;s speech and the client should then start the next Dialogflow request.
                &quot;audio&quot;: &quot;A String&quot;, # Raw audio synthesized from the Dialogflow agent&#x27;s response using the output config specified in the request.
                &quot;uri&quot;: &quot;A String&quot;, # Client-specific URI that points to an audio clip accessible to the client.
              },
            ],
          },
          &quot;payload&quot;: { # Returns a response containing a custom, platform-specific payload.
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;telephonyTransferCall&quot;: { # Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. # A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.
            &quot;phoneNumber&quot;: &quot;A String&quot;, # Transfer the call to a phone number in [E.164 format](https://en.wikipedia.org/wiki/E.164).
            &quot;sipUri&quot;: &quot;A String&quot;, # Transfer the call to a SIP endpoint.
          },
          &quot;text&quot;: { # The text response message. # Returns a text response.
            &quot;text&quot;: [ # A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
      &quot;sentimentAnalysis&quot;: { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user&#x27;s attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config # Output only. The sentiment analysis result for the message.
        &quot;queryTextSentiment&quot;: { # The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. See: https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values for how to interpret the result. # The sentiment analysis result for `query_text`.
          &quot;magnitude&quot;: 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
          &quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
        },
      },
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # Optional. Token to retrieve the next page of results, or empty if there are no more results in the list.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

</body></html>